<?php $this->extend('comm/page');?>

<div class="panel panel-default panel-intro">
    <?php echo $this->build_heading(); ?>
    <div class="panel-body">
        <div class="layui-tab layui-tab-brief" lay-filter="group" id="groups">
            <ul class="layui-tab-title" style="padding-left: 12px;">
                <?php foreach($groups as $i => $name): ?>
                <li data-group="<?php echo $name['group'];?>" class="<?php echo $i == 0 ? 'layui-this' : ''; ?>">
                    <?php echo $name['title'];?>
                </li>
                <?php endforeach;?>
            </ul>
            <div class="layui-tab-content">
                <div id="toolbar" class="toolbar">
                    <?php echo $this->build_toolbar(['refresh', 'add']); ?>
                </div>
                <table id="table" data-edit="<?php echo $edit ? 1 : 0;?>" lay-filter="table" class="mr-b-sm"></table>
            </div>
        </div>
    </div>
</div>